<!DOCTYPE html>
<html class="index_body">
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=10">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <title>订单明细</title>
    <link rel="stylesheet" href="/Public/mui/computer/css/bootstrap.css"/>
    <link rel="stylesheet" href="/Public/mui/computer/css/index.css"/>
    <link rel="stylesheet" href="/Public/mui/css/page.css"/>
    <link rel="stylesheet"  href="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.css">
    <link rel="stylesheet" type="text/css" href="/Public/mui/modalframe/css/default.css" />
    <link rel="stylesheet" type="text/css" href="/Public/mui/modalframe/css/component.css" />
    <link rel="stylesheet" href="/Public/mui/css/page.css"/>
</head>
<body class="index_body">
<include file="Lay:heder" />
<div class="container" style="width: 100%;">
    <!-- <div class="md-modal md-effect-1" id="modal-1">
        <div class="md-content">
            <div class="images_content" style="width: 600px;height:600px;">
            <h3>图片展示</h3><button class="md-close" style="width: 100%;">取消</button>
                <img id="imgmodeltanchu" src="" alt="" style="width:100%;height:100%;margin:0 auto;">
            </div>
        </div>
    </div> -->
    <div id="section" style="padding-top: 20px">
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>订单信息</th>
                <th>融资租赁合同</th>
                <th>抵押合同</th>
                <th>订单号</th>
                <th>所属省市</th>
                <th>车库位置</th>
                <th>顾问姓名</th>
                <th>顾问岗位号</th>
                <th>渠道编号</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td><a href="/admin/order/ordercontractadd?id={{$order_data['id']}}">点击上传合同</a></td>
                <td><if condition="$order_data['financelease_url']"> 
                <a class="md-trigger" data-modal="modal-1" onclick="ejectepdf('{{$order_data['weburl_url']}}{{$order_data['financelease_url']}}')">点击查看融资租赁</a>
                <else/>
                暂未上传合同
                </if></td>
                <td><if condition="$order_data['mortgagecontract_url']">
                <!-- /抵押合同 -->
                <a class="md-trigger" data-modal="modal-1" onclick="ejectepdf('{{$order_data['weburl_url']}}{{$order_data['mortgagecontract_url']}}')">点击查看抵押合同</a>
                <else/>
                暂未上传合同
                </if></td>
                <td>{{$order_data['orderid']}}</td>
                <td>{{$order_data['provinceid']}} / {{$order_data['cityid']}}</td>
                <td>{{$order_data['soket']?$order_data['soket']:临时购车}}</td>
                <td>{{$order_data['GWname']}}</td>
                <td>{{$order_data['GWnum']}}</td>
                <td>{{$order_data['waynum']?$order_data['waynum']:暂无渠道}}</td>
            </tr>
            </tbody>
        </table>
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>车辆信息</th>
                <!-- <th>车辆编号</th> -->
                <th>车辆名称</th>
                <th>车辆颜色</th>
                <th>车辆类型</th>
                <th>金融方案</th>
                <th>优优价</th>
                <th>首付</th>
                <th>月租金</th>
                <th>还款期数</th>
                <th>车辆保单</th>
                <th>车辆发票</th>
                <th>车辆购置税</th>
                <th>车辆合格证</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td></td>
                <!-- <td>{{$order_data['carnum']}}</td> -->
                <td>{{$order_data['carname']}}</td>
                <td>{{$order_data['colors']}}</td>
                <td>{{$order_data['cartype']}}</td>
                <td>{{$order_data['buy_type']}}</td>
                <td>{{$order_data['uu_price']}}</td>
                <td>{{$order_data['first_pay']}}</td>
                <td>{{$order_data['month_pay']}}</td>
                <td>{{$order_data['pay_month']}}</td>
                <td><if condition="$policycount gt 0">
                        <for start="0" end="$policycount">
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$order_data['policy_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                    </if>
                </td>
                <td><if condition="$insurancecount gt 0">
                        <for start="0" end="$insurancecount">
                            <!-- <a href="{{$user_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$order_data['insurance_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                    </if>
                </td>
                <td><if condition="$purchasetaxcount gt 0">
                        <for start="0" end="$purchasetaxcount">
                            <!-- <a href="{{$user_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$order_data['purchasetax_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                    </if>
                </td>
                <td><if condition="$certificatecount gt 0">
                        <for start="0" end="$certificatecount">
                            <!-- <a href="{{$user_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$order_data['certificate_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                    </if>
                </td>
            </tr>
            </tbody>
        </table>
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>客户信息</th>
                <th>姓名</th>
                <th>性别</th>
                <th>出生日期</th>
                <th>婚姻状态</th>
                <th>户籍地址</th>
                <th>常驻地址</th>
                <th>公司地址</th>
                <th>个人住房性质</th>
                <th>身份证(照片)</th>
                <th>银行卡号</th>
                <th>银行名称</th>
                <th>银行账户名</th>
                <th>注册手机号</th>
                <th>大数据审核</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td></td>
                <td>{{$user_data['nickname']}}</td>
                <td>{{$user_data['sex']}}</td>
                <td>{{$user_data['birthday']}}</td>
                <!-- <td>{{$user_data['city']}}</td> -->
                <td>{{$user_data['marriage']}}</td>
                <td>{{$user_data['address']}}</td>
                <td>{{$user_data['companyaddress']}}</td>
                <td>{{$user_data['liveaddress']}}</td>
                <td>{{$user_data['housingnature']}}</td>
                <td>
                    <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['identify_url'][0]}}')">点击查看身份证正面</a><br />
                    <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['identify_url'][1]}}')">点击查看身份证反面</a><br />
                    <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['identify_url'][2]}}')">点击查看渠道证人照片</a>
                </td>
                <td >{{$user_data['banknum']}}</td>
                <td >{{$user_data['bank']}}</td>
                <td>{{$user_data['banker']}}</td>
                <td><a href="tel:{{$user_data['tel']}}">{{$user_data['tel']}}</a></td>
                <td><a href="/admin/Credit/creditlistdetails?uid={{$order_data['uid']}}">进行大数据审核</a></td>
            </tr>
            </tbody>
        </table>
        <table class="table table-hover table-bordered table_tong">
            <thead>
            <tr>
                <th>客户信息</th>
                <th>客户类型</th>
                <th>进件计算表</th>
                <th>本人驾驶证</th>
                <th>单位名称</th>
                <th class="usetype">个人税前收入</th>
                <th class="usetype">信用卡情况</th>
                <th class="usetype">银行借款情况</th>
                <th class="usetype">银行流水</th>
                <th>配偶身份证/结婚证</th>
                <th>征信报告</th>
                <th>其他资料</th>
                <th>补填上传资料</th>
                <th>合同</th>
                <th>紧急联系人</th>
                <th>紧急联系人</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td></td>
                <td><if condition="($user_data['usertype'] eq 0)"> 普通用户
                <elseif condition="$user_data['usertype'] eq 1"/>一般工作人员信用等级A级
                <elseif condition="$user_data['usertype'] eq 2"/>副科级/部门负责人/副经理/子公司副总
                <else />副处级/公司副总/子公司总经理
                </if></td>
                <td><if condition="$entrycount gt 0">
                        <for start="0" end="$entrycount">
                            <!-- <a href="{{$user_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['entry_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td><!-- <a href="{{$user_data['driver_url'][0]}}" target="_blank">点击查看驾驶证照片</a> -->
                    <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['driver_url'][0]}}')">点击查看驾驶证照片</a>
                </td>

                <td>{{$user_data['workunit']}}</td>
                <td class="usetype">{{$user_data['income']}}</td>
                <td class="usetype">{{$user_data['creditcard']}}</td>
                <td class="usetype">{{$user_data['borrowing']}}</td>
                <td class="usetype">
                    <if condition="$bankflowcount gt 0">
                        <for start="0" end="$bankflowcount">
                            <!-- <a href="{{$user_data['bankflow_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['bankflow_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td><if condition="$workproofcount gt 0">
                        <for start="0" end="$workproofcount">
                            <!-- <a href="{{$user_data['workproof_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['workproof_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td><if condition="$creditreportcount gt 0">
                        <for start="0" end="$creditreportcount">
                            <!-- <a href="{{$user_data['creditreport_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['creditreport_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td>
                    <if condition="$otherdatacount gt 0">
                        <for start="0" end="$otherdatacount">
                            <!-- <a href="{{$user_data['otherdata_url'][$i]}}" target="_blank">图 {{$i+1}}</a> -->
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$user_data['oss_url']}}{{$user_data['otherdata_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td>
                    <if condition="$supplementdatacount gt 0">
                        <for start="0" end="$supplementdatacount">
                            <a class="md-trigger" data-modal="modal-1" onclick="ejectmodel('{{$order_data['weburl_url']}}{{$order_data['supplementdata_url'][$i]}}')">图 {{$i+1}}</a>
                        </for>
                        <else />
                        暂无资料
                    </if>
                </td>
                <td>
                    <if condition="$user_data['contract_url']">
                         <a class="md-trigger" data-modal="modal-1" onclick="ejectepdf('/Public/Uploads/payment/{{$user_data['id']}}/contract_url/{{$user_data['contract_url']}}')">抵押合同</a>
                        <else />
                        暂无合同
                    </if>
                    <if condition="$user_data['financelease_contract_url']">
                         <a class="md-trigger" data-modal="modal-1" onclick="ejectepdf('/Public/Uploads/payment/{{$user_data['id']}}/contract_url/{{$user_data['financelease_contract_url']}}')">融资合同</a>
                        <else />
                        暂无合同
                    </if>
                </td>

                <td>
                    {{$user_data['contacts_name']}}/{{$user_data['contacts_bearing']}}/{{$user_data['contacts_phone']}}
                </td>
                <td>
                    {{$user_data['contacts_user_name']}}/{{$user_data['contacts_sip_bearing']}}/{{$user_data['contacts_phone_tel']}}
                    
                </td>
            </tr>
            </tbody>
        </table>
        <include file="News:news" />
        <input type="hidden" name="remark" value="">
        <if condition="$_GET['isyy'] neq true">
            <div class="btnK">
                <button type="button" class="btn btn-success navbar-btn"    onclick="isGetOrder(1);">通过</button>
                <button type="button" class="btn btn-orange navbar-btn"     onclick="isGetOrder(-2);" style="background-color: orange;color:#fff">驳回订单</button>
                <button type="button" class="btn btn btn-danger navbar-btn" onclick="isGetOrder(-1);">拒单</button>
            </div>
        </if>
    </div>
</div>
<div class="mask-layer" style="display: none">
    <div class="mask-layer-black"></div>
    <div class="mask-layer-container">
        <div class="mask-layer-container-operate">
            <!-- <button class="mask-prev btn-default-styles" style="float: left">上一张</button> -->
            <button class="mask-out btn-default-styles">放大</button>
            <button class="mask-in btn-default-styles">缩小</button>
            <button class="mask-clockwise btn-default-styles">顺旋转</button>
            <button class="mask-counterclockwise btn-default-styles">逆旋转</button>
            <button class="mask-close btn-default-styles">关闭</button>
            <!-- <button class="mask-next btn-default-styles" style="float: right">下一张</button> -->
        </div>
        <div class="mask-layer-imgbox auto-img-center">
            <p>
                <img id="imgmodeltanchu" src="" alt="" style="width: 620px; margin-top: 43.5px;height: 100%">
            </p >
        </div>
    </div>
</div>
<div class="mask-layer-pdf" style="display: none">
        <div class="mask-layer-black"></div>
        <div class="mask-layer-container">
            <div class="mask-layer-container-operate">
                <button class="mask-close delpdflis" style="background:#8C85E6;">关闭</button>
            </div>
            <div class="mask-layer-imgbox auto-img-center">
                <embed  src="" id="review" style="width: 620px; margin-top: 43.5px;height: 100%">
                </embed>
                <!-- <p>
                    <img  src="" alt="" style="width: 620px; margin-top: 43.5px;height: 100%">
                </p > -->
            </div>
        </div>
    </div>
<script src="/Public/mui/computer/js/jquery-1.11.3.js"></script>
<script type="text/javascript" src="/Public/mui/static/bower_components/sweetalert/dist/sweetalert.min.js"></script>
<script type="text/javascript" src="/Public/mui/computer/js/functions.js"></script>
<script src="/Public/mui/computer/js/back.js"></script>
<!-- <script src="/Public/mui/modalframe/js/classie.js"></script>
<script src="/Public/mui/modalframe/js/modalEffects.js"></script> -->
<script src="/Public/mui/computer/js/enlarge.js"></script>
<script>
    var use = "{{$user_data['usertype']}}";
    if(use != 0){
        $(".usetype").css("display","none");
    }
    function isGetOrder(status){
        swal({title: "确定修改订单的状态吗？",text: "修改后将立即生效并跳转到列表页面。", type: "warning",showCancelButton: true, confirmButtonColor: "#DD6B55",confirmButtonText: "是的",cancelButtonText: "取消", closeOnConfirm: false},
          function(){
            var orderid = "{{$order_data['orderid']}}";

            if(orderid == ""){
                sweetAlert('','对不起,操作有误,请重新刷新页面','error');return false;
            }

            var remark = $('input[name="remark"]').val();
            if(status==-2&&remark==''){
                swal({ 
                  title: "备注", 
                  text: "为什么驳回？",
                  type: "input", 
                  confirmButtonText: "好了",
                  cancelButtonText: "取消",
                  showCancelButton: true, 
                  closeOnConfirm: false, 
                  animation: "slide-from-top", 
                  inputPlaceholder: "请简单说明为什么驳回。"
                },
                function(inputValue){ 
                  if(inputValue!=""&&inputValue){
                    $('input[name="remark"]').val(inputValue);
                    data = {'orderid':orderid,'status':status,'remark':inputValue}
                    sendStatus(data);
                  }
                });
                return false;
            }else if(status==1&&remark==''){
                swal({ 
                  title: "通过备注", 
                  text: "为什么通过？",
                  type: "input", 
                  confirmButtonText: "好了",
                  cancelButtonText: "不填",
                  showCancelButton: true, 
                  closeOnConfirm: false, 
                  animation: "slide-from-top", 
                  inputPlaceholder: "请简单说明为什么通过。"
                },
                function(inputValue){ 
                    $('input[name="remark"]').val(inputValue);
                    data = {'orderid':orderid,'status':status,'remark':inputValue}
                    sendStatus(data);
                });
                return false;
            }else if(status==-1&&remark==''){
                swal({ 
                  title: "通过拒绝", 
                  text: "为什么拒绝？",
                  type: "input", 
                  confirmButtonText: "好了",
                  cancelButtonText: "不填",
                  showCancelButton: true, 
                  closeOnConfirm: false, 
                  animation: "slide-from-top", 
                  inputPlaceholder: "请简单说明为什么拒绝。"
                },
                function(inputValue){ 
                    $('input[name="remark"]').val(inputValue);
                    data = {'orderid':orderid,'status':status,'remark':inputValue}
                    sendStatus(data);
                });
                return false;
            }

          });
    }

    function sendStatus(data) {
        post("riskEvaluate",data,function(res){
                if(res['ret'] == 1){
                    sweetAlert('','操作成功','success');
                    setTimeout(function () {
                      location.href = '/admin/order/orderlistindex';
                    },3000);
                }else if(res == 2){
                    sweetAlert('','订单已做修改,请刷新重新获取资料','error');

                    return false;
                }else{
                    window.location.href="/admin/order/orderlistindex";
                }
            });
    }
    var adminshowznum1 = 0;
    function ejectmodel(id){
        document.getElementById("imgmodeltanchu").src=id;
        $('.mask-layer').show();
    } 
    function ejectepdf(id){
        document.getElementById("review").src=id;
        $('.mask-layer-pdf').show();
    }
    $(".delpdflis").on('click',function(){
        $('.mask-layer-pdf').hide();
    })
    $("body").delegate(".images_content>img","click",function(){
        adminshowznum1 ++;
        this.style.transform = 'rotate('+90*adminshowznum1+'deg)';
    });
</script>
</body>
</html>